<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>wwwApp: form.php File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">wwwApp
   </div>
   <div id="projectbrief">A web app for workshop organizing, recruitment and qualification</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">form.php File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><a href="form_8php_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classForm.html">Form</a></td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a38d3d05e993dce971ae9af083f4902a7"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="form_8php.html#a38d3d05e993dce971ae9af083f4902a7">generateFormRows</a> ($inputs, $previous=array())</td></tr>
<tr class="memitem:a4569360da5e9495ff2456dbab40966c2"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="form_8php.html#a4569360da5e9495ff2456dbab40966c2">buildFormRow</a> ($type, $name=NULL, $description=NULL, $default=NULL, $options=array(), $ignorePOST=false)</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a788f80e2d8f0fe6e44078358775a74b0"><td class="memItemLeft" align="right" valign="top">const&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="form_8php.html#a788f80e2d8f0fe6e44078358775a74b0">VALUE_OTHER</a> = -66642</td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a4569360da5e9495ff2456dbab40966c2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">buildFormRow </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$name</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$description</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$default</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$options</em> = <code>array()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$ignorePOST</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="form_8php_source.html#l00262">262</a> of file <a class="el" href="form_8php_source.html">form.php</a>.</p>

<p>Referenced by <a class="el" href="form_8php_source.html#l00245">generateFormRows()</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">        global <a class="code" href="index_8php.html#ae1848ae8dc4014bc7c680e5504a8eef0">$PAGE</a>;</div>
<div class="line">        <span class="comment">// Handle named arguments.</span></div>
<div class="line">        $properties = $readonly = $text = $hidden = $other = $errors = $autocomplete = $custom = null;</div>
<div class="line">        <span class="keywordflow">if</span> (is_array($type) || $type instanceof ArrayObject)</div>
<div class="line">                <span class="keywordflow">foreach</span> ($type as $key =&gt; $val)</div>
<div class="line">                        $$key = $val;</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">if</span> (!isset($properties))  $properties = <span class="stringliteral">&#39;&#39;</span>;</div>
<div class="line">        <span class="keywordflow">if</span> (!isset($readonly))    $readonly = <span class="keyword">false</span>;</div>
<div class="line">        <span class="keywordflow">if</span> (!isset($text))        $text = <span class="stringliteral">&#39;&#39;</span>;</div>
<div class="line">        <span class="keywordflow">if</span> (!isset($hidden))      $hidden = <span class="keyword">false</span>;</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">if</span> ($hidden)  <span class="keywordflow">return</span> <span class="stringliteral">&#39;&#39;</span>;</div>
<div class="line"></div>
<div class="line">        $rtype = $type;</div>
<div class="line">        <span class="keywordflow">if</span> ($type == <span class="stringliteral">&#39;timestamp&#39;</span>)  $default = strftime(<span class="stringliteral">&#39;%Y-%m-%d %H:%M&#39;</span>, $default);</div>
<div class="line">        <span class="keywordflow">if</span> (isset($_POST[$name]) &amp;&amp; !$ignorePOST)  $default = $_POST[$name];</div>
<div class="line"></div>
<div class="line">        $row = <span class="stringliteral">&quot;&lt;tr id=&#39;row_$name&#39;&gt;&quot;</span>;</div>
<div class="line">        <span class="keywordflow">if</span> ($readonly)</div>
<div class="line">        {</div>
<div class="line">                <span class="keywordflow">if</span> (is_array($default)) <span class="comment">// Checkboxgroup</span></div>
<div class="line">                {</div>
<div class="line">                        $tmp = array();</div>
<div class="line">                        <span class="keywordflow">if</span> (!empty($options))</div>
<div class="line">                                <span class="keywordflow">foreach</span> ($default as $d)  $tmp[]= $options[$d];</div>
<div class="line">                        $default = implode(<span class="stringliteral">&#39;, &#39;</span>, $tmp);</div>
<div class="line">                }</div>
<div class="line">                <span class="keywordflow">else</span> <span class="keywordflow">if</span> ($type == <span class="stringliteral">&#39;select&#39;</span>)</div>
<div class="line">                {</div>
<div class="line">                        <span class="keywordflow">if</span> (array_key_exists($default, $options))</div>
<div class="line">                                $default = $options[$default];</div>
<div class="line">                        <span class="keywordflow">else</span></div>
<div class="line">                                $default = _(<span class="stringliteral">&#39;other&#39;</span>) .<span class="stringliteral">&quot; ($default)&quot;</span>;</div>
<div class="line">                }</div>
<div class="line">                <span class="keywordflow">if</span> ($type == <span class="stringliteral">&#39;textarea&#39;</span> || $type == <span class="stringliteral">&#39;richtextarea&#39;</span>)</div>
<div class="line">                        $default = <span class="stringliteral">&#39;&lt;div class=&quot;descriptionBox&quot;&gt;&#39;</span>. <a class="code" href="template_8php.html#a4a7e99592a2690b33d53c9bcc8fd3008">parseUserHTML</a>($default) .<span class="stringliteral">&#39;&lt;/div&gt;&#39;</span>;</div>
<div class="line">                $row .= <span class="stringliteral">&quot;&lt;td&gt;&lt;label&gt;$description&lt;/label&gt;&lt;/td&gt;&quot;</span>;</div>
<div class="line">                $row .= <span class="stringliteral">&quot;&lt;td&gt;&lt;span $properties&gt;$default&lt;/span&gt;&lt;/td&gt;&quot;</span>;</div>
<div class="line">        }</div>
<div class="line">        <span class="keywordflow">else</span> <span class="keywordflow">switch</span> ($type)</div>
<div class="line">        {</div>
<div class="line">                <span class="keywordflow">case</span> <span class="stringliteral">&#39;textarea&#39;</span>:</div>
<div class="line">                <span class="keywordflow">case</span> <span class="stringliteral">&#39;richtextarea&#39;</span>:</div>
<div class="line">                        $row .=  <span class="stringliteral">&quot;&lt;td colspan=&#39;2&#39;&gt;&quot;</span>;</div>
<div class="line">                        $row .= <span class="stringliteral">&quot;&lt;label for=&#39;$name&#39;&gt;$description&lt;/label&gt;&quot;</span>;</div>
<div class="line">                        $height = ($type==<span class="stringliteral">&#39;textarea&#39;</span>) ? 2 : 20;</div>
<div class="line">                        $class  = ($type==<span class="stringliteral">&#39;textarea&#39;</span>) ? <span class="stringliteral">&#39;&#39;</span> : <span class="stringliteral">&#39;class=&quot;mceEditor&quot;&#39;</span>;</div>
<div class="line">                        $row .= <span class="stringliteral">&quot;&lt;br/&gt;&lt;textarea rows=&#39;$height&#39; name=&#39;$name&#39; id=&#39;$name&#39; $class $properties&gt;&quot;</span>;</div>
<div class="line">                        $row .= htmlspecialchars($default);</div>
<div class="line">                        $row .= <span class="stringliteral">&quot;&lt;/textarea&gt;&quot;</span>;</div>
<div class="line">                        $row .= <span class="stringliteral">&quot;&lt;/td&gt;&quot;</span>;</div>
<div class="line">                        <span class="keywordflow">break</span>;</div>
<div class="line">                <span class="keywordflow">case</span> <span class="stringliteral">&#39;readonly&#39;</span>:</div>
<div class="line">                        $row .= <span class="stringliteral">&quot;&lt;td&gt;&lt;label&gt;$description&lt;/label&gt;&lt;/td&gt;&quot;</span>;</div>
<div class="line">                        $row .= <span class="stringliteral">&quot;&lt;td&gt;&lt;span $properties&gt;$default&lt;/span&gt;&lt;/td&gt;&quot;</span>;</div>
<div class="line">                        <span class="keywordflow">break</span>;</div>
<div class="line">                <span class="keywordflow">case</span> <span class="stringliteral">&#39;select&#39;</span>:</div>
<div class="line">                        <span class="keywordflow">if</span> (isset($other))</div>
<div class="line">                        {</div>
<div class="line">                                $options[<a class="code" href="form_8php.html#a788f80e2d8f0fe6e44078358775a74b0">VALUE_OTHER</a>] = _(<span class="stringliteral">&#39;other...&#39;</span>);</div>
<div class="line">                                $otherIndex = count($options)-1;</div>
<div class="line">                                $properties .= <span class="stringliteral">&#39; onchange=&quot;$(\&#39;#row_&#39;</span>. $name .<span class="stringliteral">&#39;_other\&#39;).toggle(&#39;</span>.</div>
<div class="line">                                        <span class="stringliteral">&#39;this.selectedIndex==&#39;</span>. $otherIndex .<span class="stringliteral">&#39;)&quot;&#39;</span>;</div>
<div class="line">                        }</div>
<div class="line"></div>
<div class="line">                        $row .= <span class="stringliteral">&quot;&lt;td&gt;&lt;label for=&#39;$name&#39;&gt;$description&lt;/label&gt;&lt;/td&gt;&quot;</span>;</div>
<div class="line">                        $row .= <span class="stringliteral">&quot;&lt;td&gt;&lt;select name=&#39;$name&#39; id=&#39;$name&#39; $properties&gt;&quot;</span>;</div>
<div class="line">                        $foundSelected = <span class="keyword">false</span>;</div>
<div class="line">                        <span class="keywordflow">foreach</span> ($options as $val=&gt;$option)</div>
<div class="line">                        {</div>
<div class="line">                                <span class="keywordflow">if</span> (!$foundSelected &amp;&amp; ($val == <a class="code" href="form_8php.html#a788f80e2d8f0fe6e44078358775a74b0">VALUE_OTHER</a>))</div>
<div class="line">                                {</div>
<div class="line">                                        $selected = <span class="stringliteral">&#39;selected=&quot;selected&quot;&#39;</span>;</div>
<div class="line">                                }</div>
<div class="line">                                <span class="keywordflow">else</span> <span class="keywordflow">if</span> ($val == $default)</div>
<div class="line">                                {</div>
<div class="line">                                        $selected = <span class="stringliteral">&#39;selected=&quot;selected&quot;&#39;</span>;</div>
<div class="line">                                        $foundSelected = <span class="keyword">true</span>;</div>
<div class="line">                                }</div>
<div class="line">                                <span class="keywordflow">else</span> $selected = <span class="stringliteral">&#39;&#39;</span>;</div>
<div class="line">                                $row .= <span class="stringliteral">&quot;&lt;option value=&#39;$val&#39; $selected&gt;$option&lt;/option&gt;&quot;</span>;</div>
<div class="line">                        }</div>
<div class="line"></div>
<div class="line">                        <span class="keywordflow">if</span> (!$foundSelected &amp;&amp; $default &amp;&amp; !isset($other))</div>
<div class="line">                                $row .= <span class="stringliteral">&quot;&lt;option value=&#39;$default&#39; selected=&#39;selected&#39;&gt;&quot;</span>. _(<span class="stringliteral">&#39;other&#39;</span>) .<span class="stringliteral">&quot; ($default)&lt;/option&gt;&quot;</span>;</div>
<div class="line"></div>
<div class="line">                        $row .= <span class="stringliteral">&quot;&lt;/select&gt;&lt;/td&gt;&quot;</span>;</div>
<div class="line">                        <span class="keywordflow">break</span>;</div>
<div class="line">                <span class="keywordflow">case</span> <span class="stringliteral">&#39;checkboxgroup&#39;</span>:</div>
<div class="line">                        $i = 1;</div>
<div class="line">                        $name = $name .<span class="stringliteral">&#39;[]&#39;</span>;</div>
<div class="line">                        $row .= <span class="stringliteral">&quot;&lt;td&gt;&lt;label for=&#39;$name&#39;&gt;$description&lt;/label&gt;&lt;/td&gt;&lt;td&gt;&quot;</span>;</div>
<div class="line">                        <span class="keywordflow">foreach</span> ($options as $val=&gt;$option)</div>
<div class="line">                        {</div>
<div class="line">                                $row .= <span class="stringliteral">&quot;&lt;input type=&#39;checkbox&#39; class=&#39;checkbox&#39; name=&#39;$name&#39; value=&#39;$val&#39; &quot;</span>;</div>
<div class="line">                                <span class="keywordflow">if</span> (is_array($default) &amp;&amp; in_array($val, $default))  $row .= <span class="stringliteral">&#39;checked=&quot;checked&quot; &#39;</span>;</div>
<div class="line">                                $row .= <span class="stringliteral">&quot;/&gt;$option&quot;</span>;</div>
<div class="line">                                <span class="keywordflow">if</span> (!($i%3))  $row .= <span class="stringliteral">&quot;&lt;br/&gt;&quot;</span>;</div>
<div class="line">                                $i++;</div>
<div class="line">                        }</div>
<div class="line">                        $row .= <span class="stringliteral">&quot;&lt;/td&gt;&quot;</span>;</div>
<div class="line">                        <span class="keywordflow">break</span>;</div>
<div class="line">                <span class="keywordflow">case</span> <span class="stringliteral">&#39;custom&#39;</span>:</div>
<div class="line">                        $row .= <span class="stringliteral">&quot;&lt;td&gt;&lt;label for=&#39;$name&#39;&gt;$description&lt;/label&gt;&lt;/td&gt;&lt;td&gt;$custom&lt;/td&gt;&quot;</span>;</div>
<div class="line">                        <span class="keywordflow">break</span>;</div>
<div class="line">                <span class="keywordflow">case</span> <span class="stringliteral">&#39;int&#39;</span>:</div>
<div class="line">                <span class="keywordflow">case</span> <span class="stringliteral">&#39;timestamp&#39;</span>:</div>
<div class="line">                        $type = <span class="stringliteral">&#39;text&#39;</span>;</div>
<div class="line">                <span class="keywordflow">case</span> <span class="stringliteral">&#39;text&#39;</span>:</div>
<div class="line">                <span class="keywordflow">default</span>:</div>
<div class="line">                        $row .= <span class="stringliteral">&quot;&lt;td&gt;&lt;label for=&#39;$name&#39;&gt;$description&lt;/label&gt;&lt;/td&gt;&quot;</span>;</div>
<div class="line">                        $row .= <span class="stringliteral">&quot;&lt;td&gt;&lt;input type=&#39;$type&#39; name=&#39;$name&#39; id=&#39;$name&#39; $properties &quot;</span>;</div>
<div class="line">                        <span class="keywordflow">if</span> ($type == <span class="stringliteral">&#39;checkbox&#39;</span>)</div>
<div class="line">                        {</div>
<div class="line">                                <span class="keywordflow">if</span> (!empty($default) &amp;&amp; $default!=<span class="charliteral">&#39;0&#39;</span>)</div>
<div class="line">                                        $row .= <span class="stringliteral">&#39; checked=&quot;checked&quot;&#39;</span>;</div>
<div class="line">                                $row .= <span class="stringliteral">&#39; value=&quot;1&quot;&#39;</span>;</div>
<div class="line">                        }</div>
<div class="line">                        <span class="keywordflow">else</span> <span class="keywordflow">if</span> (($rtype==<span class="stringliteral">&#39;int&#39;</span>) || $default)</div>
<div class="line">                                $row .= <span class="stringliteral">&#39; value=&quot;&#39;</span>. htmlspecialchars($default) .<span class="charliteral">&#39;&quot;&#39;</span>;</div>
<div class="line">                        <span class="keywordflow">if</span> ($rtype == <span class="stringliteral">&#39;int&#39;</span>)  $row .= <span class="stringliteral">&#39; size=&quot;4&quot;&#39;</span>;</div>
<div class="line">                        <span class="keywordflow">else</span> <span class="keywordflow">if</span> ($rtype == <span class="stringliteral">&#39;text&#39;</span> || $rtype == <span class="stringliteral">&#39;timestamp&#39;</span>)  $row .= <span class="stringliteral">&#39; class=&quot;text&quot;&#39;</span>;</div>
<div class="line">                        $row .= <span class="stringliteral">&quot; /&gt;$text&quot;</span>;</div>
<div class="line">                        <span class="keywordflow">if</span> ($rtype == <span class="stringliteral">&#39;timestamp&#39;</span>)  $row .= <span class="stringliteral">&#39;&lt;small&gt;&lt;i&gt;YYYY-MM-DD HH:MM&lt;/i&gt; &#39;</span>. _(<span class="stringliteral">&#39;or&#39;</span>) .<span class="stringliteral">&#39; &lt;i&gt;YYYY-MM-DD&lt;/i&gt;&lt;/small&gt;&#39;</span>;</div>
<div class="line">                        $row .= <span class="stringliteral">&quot;&lt;/td&gt;&quot;</span>;</div>
<div class="line"></div>
<div class="line">                        <span class="keywordflow">if</span> (!empty($autocomplete))</div>
<div class="line">                        {</div>
<div class="line">                                <span class="keywordflow">foreach</span> ($autocomplete as &amp;$item)</div>
<div class="line">                                        $item = json_encode($item);</div>
<div class="line">                                $autocomplete = implode(<span class="charliteral">&#39;,&#39;</span>, $autocomplete);</div>
<div class="line">                                $PAGE-&gt;jsOnLoad .= <span class="stringliteral">&#39;$(&quot;#&#39;</span>. $name .<span class="stringliteral">&#39;&quot;).autocomplete({minLength:1,source:[&#39;</span>. $autocomplete.<span class="stringliteral">&#39;]});&#39;</span>.<span class="stringliteral">&quot;\n&quot;</span>;</div>
<div class="line">                        }</div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">if</span> (isset($errors))</div>
<div class="line">        {</div>
<div class="line">                $row .= <span class="stringliteral">&quot;&lt;td class=&#39;formError&#39;&gt;&lt;ul&gt;&quot;</span>;</div>
<div class="line">                <span class="keywordflow">foreach</span> ($errors as $e)</div>
<div class="line">                {</div>
<div class="line">                        $row .= <span class="stringliteral">&quot;&lt;li&gt;$e&lt;/li&gt;&quot;</span>;</div>
<div class="line">                }</div>
<div class="line">                $row .= <span class="stringliteral">&quot;&lt;/ul&gt;&lt;/td&gt;&quot;</span>;</div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">        $row .= <span class="stringliteral">&quot;&lt;/tr&gt;&quot;</span>;</div>
<div class="line">        <span class="keywordflow">if</span> (isset($other))</div>
<div class="line">        {</div>
<div class="line">                $row .= <a class="code" href="form_8php.html#a4569360da5e9495ff2456dbab40966c2">buildFormRow</a>(array(<span class="stringliteral">&#39;name&#39;</span>=&gt;<span class="stringliteral">&quot;{$name}_other&quot;</span>, <span class="stringliteral">&#39;description&#39;</span>=&gt;<span class="stringliteral">&quot; &amp;nbsp; &amp;nbsp; &amp;nbsp; $other&quot;</span>,</div>
<div class="line">                                        <span class="stringliteral">&#39;type&#39;</span>=&gt;<span class="stringliteral">&#39;text&#39;</span>, <span class="stringliteral">&#39;default&#39;</span>=&gt;$default));</div>
<div class="line">                global <a class="code" href="index_8php.html#ae1848ae8dc4014bc7c680e5504a8eef0">$PAGE</a>;</div>
<div class="line">                <span class="keywordflow">if</span> ($foundSelected)</div>
<div class="line">                        $PAGE-&gt;jsOnLoad .= <span class="stringliteral">&#39;document.getElementById(&quot;row_&#39;</span>. $name .<span class="stringliteral">&#39;_other&quot;).style.display = &quot;none&quot;;&#39;</span>;</div>
<div class="line">        }</div>
<div class="line">        <span class="keywordflow">return</span> $row;</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a38d3d05e993dce971ae9af083f4902a7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">generateFormRows </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$inputs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$previous</em> = <code>array()</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="form_8php_source.html#l00245">245</a> of file <a class="el" href="form_8php_source.html">form.php</a>.</p>

<p>Referenced by <a class="el" href="form_8php_source.html#l00045">Form\getHTML()</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">        $result = <span class="stringliteral">&#39;&#39;</span>;</div>
<div class="line">        <span class="keywordflow">foreach</span> ($inputs as $row)</div>
<div class="line">        {</div>
<div class="line">                <span class="keywordflow">if</span> (isset($row[<span class="stringliteral">&#39;name&#39;</span>]))  $arguments = $row;</div>
<div class="line">                <span class="keywordflow">else</span>  $arguments = array(<span class="stringliteral">&#39;type&#39;</span>=&gt;$row[0], <span class="stringliteral">&#39;name&#39;</span>=&gt;$row[1], <span class="stringliteral">&#39;description&#39;</span>=&gt;$row[2]);</div>
<div class="line">                <span class="keywordflow">if</span> (isset($arguments[<span class="stringliteral">&#39;readonly&#39;</span>]) &amp;&amp; $arguments[<span class="stringliteral">&#39;readonly&#39;</span>] &amp;&amp; isset($arguments[<span class="stringliteral">&#39;default&#39;</span>]))</div>
<div class="line">                        ; <span class="comment">// old forms sometimes may have fields set in &#39;default&#39; instead of $previous DEPRECATED.</span></div>
<div class="line">                <span class="keywordflow">else</span> <span class="keywordflow">if</span> (isset($previous[$arguments[<span class="stringliteral">&#39;name&#39;</span>]]) &amp;&amp; !is_null($previous[$arguments[<span class="stringliteral">&#39;name&#39;</span>]]))</div>
<div class="line">                        $arguments[<span class="stringliteral">&#39;default&#39;</span>] = $previous[$arguments[<span class="stringliteral">&#39;name&#39;</span>]];</div>
<div class="line">                $result .= <a class="code" href="form_8php.html#a4569360da5e9495ff2456dbab40966c2">buildFormRow</a>($arguments);</div>
<div class="line">        }</div>
<div class="line">        <span class="keywordflow">return</span> $result;</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<hr/><h2>Variable Documentation</h2>
<a class="anchor" id="a788f80e2d8f0fe6e44078358775a74b0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const VALUE_OTHER = -66642</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="form_8php_source.html#l00261">261</a> of file <a class="el" href="form_8php_source.html">form.php</a>.</p>

<p>Referenced by <a class="el" href="form_8php_source.html#l00262">buildFormRow()</a>, and <a class="el" href="form_8php_source.html#l00092">Form\fetchValues()</a>.</p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun Sep 8 2013 17:44:57 for wwwApp by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.1.1
</small></address>
</body>
</html>
